<template>
  <div id="app">
    <div>
      <div class="company-header">
        <div class="header-content">
          <div class="logo-container">
            <img src="./assets/logo/logo.png" alt="公司Logo" class="company-logo">
          </div>
          <div class="company-titles">
            <h1>深圳市新鹏原电子有限公司</h1>
            <h2>Shenzhen Xinpeng Yuan Electronics Co., Ltd</h2>
          </div>
        </div>
      </div>
      <nav class="premium-nav">
        <router-link to="/">首页</router-link>
        <router-link to="/products">产品中心</router-link>
        <router-link to="/about">关于我们</router-link>
        <router-link to="/contact">联系我们</router-link>
      </nav>
    </div>
    <div class="content">
      <router-view />
    </div>
  </div>
</template>

<style>
#app {
  font-family: 'Microsoft YaHei', Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.company-header {
  background: linear-gradient(135deg, #0c3483 0%, #1a4b8c 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo-container {
  margin-right: 20px;
}

.company-logo {
  height: 60px;
  width: auto;
}

.company-titles {
  text-align: left;
}

.company-header h1 {
  font-size: 2.4rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 1px;
}

.company-header h2 {
  font-size: 1.3rem;
  margin: 8px 0 0;
  font-weight: 300;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.premium-nav {
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.premium-nav a {
  color: #333;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 10px 25px;
  margin: 0 5px;
  position: relative;
  transition: all 0.3s ease;
}

.premium-nav a:hover {
  color: #1976d2;
  transform: none;
}

.premium-nav a.router-link-exact-active {
  color: #1976d2;
  background: none;
}

.premium-nav a.router-link-exact-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 25%;
  width: 50%;
  height: 3px;
  background: #1976d2;
  border-radius: 3px;
}

/* 移除分隔符样式 */
.separator {
  display: none;
}
#app {
  font-family: 'Microsoft YaHei', Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

.company-header {
  background: linear-gradient(135deg, #1e5799 0%,#207cca 100%);
  color: white;
  padding: 30px 0;
  margin-bottom: 20px;
}

.company-header h1 {
  font-size: 2.2rem;
  margin: 0;
  padding: 0;
  font-weight: 500;
}

.company-header h2 {
  font-size: 1.2rem;
  margin: 10px 0 0;
  padding: 0;
  font-weight: 300;
  letter-spacing: 1px;
}

nav {
  padding: 20px 15px; /* 增加上下内边距 */
  background-color: #1976d2; /* 宝蓝色主色调 */
  box-shadow: 0 2px 8px rgba(0, 60, 136, 0.15); /* 添加柔和阴影 */
  display: flex; /* 使用flex布局 */
  justify-content: center; /* 内容居中 */
  gap: 25px; /* 直接控制导航项间距 */
}

nav a {
  color: #ffffff; /* 纯白色文字 */
  margin: 0; /* 移除原有margin，用gap控制间距 */
  font-size: 1.15rem; /* 稍增大字体 */
  font-weight: 500;
  padding: 8px 12px; /* 增加内边距 */
  border-radius: 6px; /* 增大圆角 */
  transition: all 0.3s ease;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.15); /* 更明显的悬停背景 */
  transform: translateY(-2px); /* 轻微上移效果 */
}

nav a.router-link-exact-active {
  color: #81c784; /* 青绿色高亮 */
  background-color: rgba(129, 199, 132, 0.15); /* 匹配的激活背景 */
}

.separator {
  color: rgba(255, 255, 255, 0.3); /* 调整分隔符颜色 */
  align-self: center; /* 垂直居中 */
  font-size: 1.2rem;
}

.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content {
  margin-top: 20px; /* 根据头部高度调整 */
  padding: 20px;
}
</style>
